package com.ag.bean;

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbConnectLog entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_CONNECT_LOG", schema = "dbo", catalog = "AGDB")
public class TbConnectLog implements java.io.Serializable {

	// Fields

	private TbConnectLogId id;
	private TbUser tbUser;
	private Date endTime;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbConnectLog() {
	}

	/** minimal constructor */
	public TbConnectLog(TbConnectLogId id, TbUser tbUser) {
		this.id = id;
		this.tbUser = tbUser;
	}

	/** full constructor */
	public TbConnectLog(TbConnectLogId id, TbUser tbUser, Date endTime,
			String a, String b, String c) {
		this.id = id;
		this.tbUser = tbUser;
		this.endTime = endTime;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "UId", column = @Column(name = "U_ID", nullable = false, length = 50)),
			@AttributeOverride(name = "startTime", column = @Column(name = "START_TIME", nullable = false, length = 23)) })
	public TbConnectLogId getId() {
		return this.id;
	}

	public void setId(TbConnectLogId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "U_ID", nullable = false, insertable = false, updatable = false)
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "END_TIME", length = 23)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}